<?php



class ReleaseMapBuilder {

	
	const CLASS_NAME = 'lib.model.map.ReleaseMapBuilder';

	
	private $dbMap;

	
	public function isBuilt()
	{
		return ($this->dbMap !== null);
	}

	
	public function getDatabaseMap()
	{
		return $this->dbMap;
	}

	
	public function doBuild()
	{
		$this->dbMap = Propel::getDatabaseMap('propel');

		$tMap = $this->dbMap->addTable('release');
		$tMap->setPhpName('Release');

		$tMap->setUseIdGenerator(true);

		$tMap->addPrimaryKey('ID', 'Id', 'int', CreoleTypes::INTEGER, true, null);

		$tMap->addColumn('NOMBRE', 'Nombre', 'string', CreoleTypes::VARCHAR, true, 50);

		$tMap->addForeignKey('VIDEO_ID', 'VideoId', 'int', CreoleTypes::INTEGER, 'video', 'ID', true, null);

		$tMap->addColumn('SUBTITULOS_COLOREADOS', 'SubtitulosColoreados', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addForeignKey('CODEC_VIDEO_ID', 'CodecVideoId', 'int', CreoleTypes::TINYINT, 'codec_video', 'ID', false, null);

		$tMap->addForeignKey('CODEC_AUDIO_ID', 'CodecAudioId', 'int', CreoleTypes::TINYINT, 'codec_audio', 'ID', false, null);

		$tMap->addForeignKey('CONTENEDOR_ID', 'ContenedorId', 'int', CreoleTypes::TINYINT, 'contenedor', 'ID', false, null);

		$tMap->addColumn('RESOLUCION', 'Resolucion', 'string', CreoleTypes::VARCHAR, false, 10);

		$tMap->addForeignKey('FUENTE_VIDEO_ID', 'FuenteVideoId', 'int', CreoleTypes::SMALLINT, 'fuente_video', 'ID', false, null);

		$tMap->addColumn('CENSURADO', 'Censurado', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addColumn('RECOMENDADO', 'Recomendado', 'int', CreoleTypes::TINYINT, false, null);

		$tMap->addColumn('INSERTADO', 'Insertado', 'int', CreoleTypes::DATE, true, null);

		$tMap->addColumn('FINALIZADO', 'Finalizado', 'int', CreoleTypes::TINYINT, true, null);

	} 
} 